<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const food = '西兰花炒蛋'
      const dog = '边牧'

      // const person = {
      //   food: food,
      //   dog: dog,
      //   jump: function () {
      //     console.log('咣')
      //   },
      // }
      const person = {
        // 属性名 和变量名 相同 才可以简写
        food, //  food: food,
        dog, // dog: dog,
        jump() {
          console.log('咻~~~~ 扑通')
        }, // jump: function () {
        //   console.log('咣')
        // },
      }
      person.jump()
      // console.log('person:', person)
    </script>
  </body>
</html>
